import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';

import { ActivityPage }       from '../pages/activity/activity';
import { DetailsPage }        from '../pages/activity/details';

import { HomePage }           from '../pages/home/home';
import { GamesPage }          from '../pages/home/games/games';
import { PlatformsPage }      from '../pages/home/platforms/platforms';

import { PlayGamePage }       from '../pages/play-game/play-game';

import { MePage }             from '../pages/me/me';
import { UserInfoPage }       from '../pages/me/user-info/user-info';
import { ChangeUserInfoPage}  from '../pages/me/user-info/changeUserInfo';
import { ServicePage }        from '../pages/me/service/service';
import { AboutPage }          from '../pages/me/about/about';
import { BankPage }           from '../pages/me/bank/bank';
import { AddBankPage }        from '../pages/me/bank/addBank';
import { ChangePwdPage }      from '../pages/me/password/changePwd';
import { MessagePage }        from '../pages/me/message/message';
import { ProblemPage }        from '../pages/me/problem/problem';
import { PasswordPage }       from '../pages/me/password/password';
import { BettingPage }        from '../pages/me/betting/betting';

import { LoginPage }          from '../pages/account/login/login';
import { RegisterPage }       from '../pages/account/register/register';

import { TabsPage }           from '../pages/tabs/tabs';

import { WalletPage }         from '../pages/wallet/wallet';
import { DepositPage }        from '../pages/wallet/deposit/deposit'
import { TransferPage }       from '../pages/wallet/transfer/transfer'
import { WithdrawalPage }     from '../pages/wallet/withdrawal/withdrawal'
import { TransactionPage }    from '../pages/wallet/transaction/transaction'
import { HistoryPage }        from '../pages/wallet/history/history'


import { ComponentsModule }   from '../components/components.module';
import { MultiPickerModule }  from 'ion-multi-picker';
import { CookieService }      from 'ngx-cookie-service';

import { StatusBar }          from '@ionic-native/status-bar';
import { SplashScreen }       from '@ionic-native/splash-screen';
import { HTTP }               from '@ionic-native/http';
import { Toast }              from '@ionic-native/toast';
import { NativeStorage }      from '@ionic-native/native-storage';
import { ActionSheet }        from '@ionic-native/action-sheet';
import { SpinnerDialog }      from '@ionic-native/spinner-dialog';

import { HttpClientModule }   from '@angular/common/http';
import { HttpService }        from '../service/httpService';
import { NativeService }      from "../service/NativeService";
import { UserService }        from "../service/userService";


@NgModule({
  declarations: [
    MyApp,
    MePage,
    PlatformsPage,
    ActivityPage,
    HomePage,
    ServicePage,
    LoginPage,
    TabsPage,
    WalletPage,
    AboutPage,
    BankPage,
    MessagePage,
    ProblemPage,
    PasswordPage,
    DepositPage,
    TransferPage,
    WithdrawalPage,
    AddBankPage,
    UserInfoPage,
    RegisterPage,
    PlayGamePage,
    DetailsPage,
    ChangeUserInfoPage,
    ChangePwdPage,
    GamesPage,
    TransactionPage,
    HistoryPage,
    BettingPage
  ],
  imports: [
    BrowserModule,
    HttpClientModule,
    ComponentsModule,
    MultiPickerModule,
    IonicModule.forRoot(MyApp, {
        mode: 'ios',//android是'md'
        backButtonText: '返回',
        tabsHideOnSubPages: 'true'
    })
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    MePage,
    PlatformsPage,
    ActivityPage,
    HomePage,
    ServicePage,
    LoginPage,
    TabsPage,
    WalletPage,
    AboutPage,
    BankPage,
    MessagePage,
    ProblemPage,
    PasswordPage,
    DepositPage,
    TransferPage,
    WithdrawalPage,
    AddBankPage,
    UserInfoPage,
    RegisterPage,
    PlayGamePage,
    DetailsPage,
    ChangeUserInfoPage,
    ChangePwdPage,
    GamesPage,
    TransactionPage,
    HistoryPage,
    BettingPage
  ],
  providers: [
    StatusBar,
    SplashScreen,
    HTTP,Toast,NativeStorage,ActionSheet,SpinnerDialog,
    HttpClientModule,
    HttpService,
    NativeService,
    CookieService,
    UserService,
    {provide: ErrorHandler, useClass: IonicErrorHandler}
  ]
})
export class AppModule {}
